package base.arrays;

import java.util.Arrays;
import java.util.Comparator;

public class arrsssss {
    public static void main(String[] args) {
       Integer[] arr = {9,8,7,6,5,4,3,2,1};
       Arrays.sort(arr, new Comparator<Integer>() {
           @Override
           // o1 : 遍历到的无序 元素
           public int compare(Integer o1, Integer o2) {
               System.out.println("o1="+o1);
               System.out.println("o2="+o2);
               System.out.println("----------");
               return o1 - o2;
           }
       });
        System.out.println(Arrays.toString(arr));
    }
}
